package StringDemo.demo5;

public class SeneitiveString {
    public static void main(String[] args) {
        //获取说的话
        String talk = "你玩的真好，以后不要再玩了，TMD，CNM";
        //定义一个敏感词库
        String[] arr = {"TMD","CNM","SB","MLGB"};
        //循环敏感词库进行替换
        for (int i = 0; i < arr.length; i++) {
            talk = talk.replace(arr[i],"***");
        }
        System.out.println(talk);
    }
}
